﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LunarCalendar.aspx.cs" Inherits="TienTeTuong.LunarCalendar" %>
<table width="239" align="center" cellpadding="0" cellspacing="1" class="rightCalendarTable">
                    	<tr><td title="Tháng trước" onclick="getCal('m=<%= Month > 1 ? Month - 1 : 12 %>&y=<%= Month > 1 ? Year : Year - 1%>')"></td><td colspan="5" class="Title">Tháng <%= Month %> năm <%= Year %></td><td title="Tháng sau" onclick="getCal('m=<%= Month < 12 ? Month + 1 : 1 %>&y=<%= Month < 12 ? Year : Year + 1%>')"></td></tr>
                        <tr>
                        	<th>CN</th>
                        	<th>Hai</th>
                        	<th>Ba</th>
                        	<th>Tư</th>
                        	<th>Năm</th>
                        	<th>Sáu</th>
                        	<th>Bảy</th>
                        </tr>
                        <% for (int i = 0; i < 6; i++)
                           {
%>
                        <tr>
                            <% for (int j = 0; j < 7; j++)
{%>
                        	<td <%= j == 0 ? "class=\"sunday\"" : "" %> title="<%= LunarDays[i,j] %>" <%= SolarDays[i,j] != 0 ? "" : "class=\"none\"" %>><%= Events[i, j] != 0 ? "<span class=\"" + (Events[i, j] == 1 ? "event" : "current") + "\">" : ""%><%= SolarDays[i,j] != 0 ? SolarDays[i,j].ToString() : "" %><%= Events[i, j] != 0 ? "</span>" : "" %></td>
                            <%
}%>
                        </tr>
                        <%
                           }%>
</table>